<layout name="Qingtaoke/default" />
<div class="col-md-offset-1 col-md-10">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h5>热搜词排行 API</h5>
        </div>
        <div class="panel-body">
            <form action="{:U('Qingtaoke/hotWordes')}" method="post">
                <div class="form-group">
                    <label for="apikey">API KEY:</label>
                    <input type="text" name="apikey" class="form-control" value="<?php echo $apikey?>" disabled>
                </div>
                <div class="form-group">
                    <label for="v">版本:</label>
                    <input type="text" name="v" class="form-control" value="<?php echo $v?>" disabled>
                </div>
                <div class="form-group">
                    <label for="t">是否取今日新品:</label>
                    <select name="t" class="form-control">
                        <option value="1" selected>获取今日的数据（默认）</option>
                        <option value="2">获取昨日的数据</option>
                    </select>
                </div>
                <button type="submit" class="btn btn-primary">开始采集</button>
            </form>
        </div>
        <div class="panel-body">
            <table class="table table-bordered">
                <tr>
                    <td>排名 :</td>
                    <td>关键词 :</td>
                    <td>搜索总数 :</td>
                    <td>排名涨幅度 :</td>
                </tr>

                <?php foreach($datas->data as $data):?>
                <tr>
                    <td><?php echo $data->rank;?></td>
                    <td><?php echo $data->word;?></td>
                    <td><?php echo $data->total;?></td>
                    <td><?php echo $data->change;?></td>
                </tr>
                <?php endforeach;?>
            </table>
        </div>
    </div>
</div>
